export default ({ url, data, header = { 'Content-Type': 'application/json' }, method = 'GET' }) => {
	return new Promise((resolve, reject) => {
		uni.request({
			url,
			data,
			header,
			method,
			success: (res) => {
				resolve(res)
			},
			fail: (err) => {
				uni.showToast({
					title: '网络请求失败',
					duration: 2000,
					icon: 'none'
				});
				reject(err)
			},
			complete: () => {}
		});
	})
}